<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <script src="../js/function.js"></script>
    </head>
    <body>
        <a href="javascript:;" onclick="f1();">test</a>
    </body>
</html>